package com.hy.controller;

import com.hy.bean.RespBean;
import com.hy.service.PrintManagementService;
import com.hy.service.impl.PrintManagementServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 打印管理 controller层
 */
@CrossOrigin
@RestController
@RequestMapping("printManagement")
public class PrintManagementController {
    private PrintManagementService printManagementService = new PrintManagementServiceImpl();

    @GetMapping("querySalesMessage")
    public RespBean querySalesMessage(Integer currentPage,Integer pageSize){
        return printManagementService.getSalesMessage(currentPage, pageSize);
    }

    @GetMapping("queryInventory")
    public RespBean queryInventory(Integer currentPage,Integer pageSize){
        return printManagementService.getInventory(currentPage, pageSize);
    }

    @GetMapping("queryPurchase")
    public RespBean queryPurchase(Integer currentPage,Integer pageSize){
        return printManagementService.getPurchase(currentPage, pageSize);
    }
}
